package com.hunan.api.catv.entity.po;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 微信发红包记录
 * </p>
 *
 * @author wangchao
 * @since 2020-11-05
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("wx_red_packet_record")
public class WxRedPacketRecord extends Model<WxRedPacketRecord> {

    private static final long serialVersionUID = 1L;

    /**
     * 主键id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 商户订单号
     */
    private String mchBillno;

    /**
     * 创建时间
     */
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

    /**
     * 更新时间
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;

    /**
     * 商户号
     */
    private String mchId;

    /**
     * 公众账号appid
     */
    private String wxappid;

    /**
     * 用户openid
     */
    private String reOpenid;

    /**
     * 付款金额
     */
    private Integer totalAmount;

    /**
     * 微信单号
     */
    private String sendListid;

    /**
     * 状态
     */
    private Integer state;

    /**
     * 状态码
     */
    private String returnCode;

    /**
     * 原因 失败原因
     */
    private String reason;

    /**
     * 逻辑删除 0:已删除 1:未删除
     */
    private Integer deleted;

    /**
     * 创建人
     */
    private Integer createBy;

    /**
     * 更新人
     */
    private Integer updateBy;

    /**
     * GROUP:裂变红包
     * NORMAL:普通红包
     */
    private String hbType;

    /**
     * 红包个数
     */
    private Integer totalNum;


    public static final String ID = "id";

    public static final String MCH_BILLNO = "mch_billno";

    public static final String CREATE_TIME = "create_time";

    public static final String UPDATE_TIME = "update_time";

    public static final String MCH_ID = "mch_id";

    public static final String WXAPPID = "wxappid";

    public static final String RE_OPENID = "re_openid";

    public static final String TOTAL_AMOUNT = "total_amount";

    public static final String SEND_LISTID = "send_listid";

    public static final String STATE = "state";

    public static final String RETURN_CODE = "return_code";

    public static final String REASON = "reason";

    public static final String DELETED = "deleted";

    public static final String CREATE_BY = "create_by";

    public static final String UPDATE_BY = "update_by";

    public static final String HB_TYPE = "hb_type";

    public static final String TOTAL_NUM = "total_num";

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
